﻿<div class="wrapper border-bottom white-bg page-heading">
    <div class="col-lg-pull-12">
        <ol class="breadcrumb" style="width:1200px;">
            <li class="active">账单列表</li>
        </ol>
    </div>
</div>
<div ng-controller="billController">
	<form class="form-horizontal row">
		<div class="form-group">
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">商户号</label>
				<div class="col-sm-8">
					<input name="merchant_no" type="text" class="form-control input-sm" ng-model="query.merchant_no">
				</div>
			</div>
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">手机号</label>
				<div class="col-sm-8">
					<input name="mobile" type="text" class="form-control input-sm" ng-model="query.mobile">
				</div>
			</div>
			<div class="col-sm-4">
				<label class="col-sm-4 control-label">姓名</label>
				<div class="col-sm-8">
					<input name="name" type="text" class="form-control input-sm" ng-model="query.name">
				</div>
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-4" ng-if="query.is_oem=='false'">
				<label class="col-sm-4 control-label">OEM商户</label>
				<div class="col-sm-8">
					<ui-select ng-model="query.merchant_id" theme="bootstrap">
						<ui-select-match placeholder="选择OEM商户">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices repeat="item.id as item in oems | propsFilter: {name: $select.search}">
							<span ng-bind="item.name"></span>
						</ui-select-choices>
					</ui-select>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="col-sm-offset-4 col-sm-8">
					<a class="btn btn-primary btn-sm" ui-sref="app.finance.bill(query)"><i class="fa fa-search"></i> 查询</a>
					<a class="btn btn-primary btn-sm" ng-click="search()"><i class="fa fa-refresh"></i> 刷新</a>
				</div>
			</div>
		</div>
    </form>
    <table class="table table-hover m-t-md" style="width:1200px">
        <thead>
            <tr>
                <th>账户</th>
                <th>余额</th>
                <th>待确认</th>
                <th>已提现</th>
                <th>提现中</th>
                <th>可提现</th>
                <th>可代付金额</th>
                <th>待高清金额</th>
                <th>APP收款</th>
                <th>账务冻结</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="item in model.rows">
                <td>{{item.mobile}}</td>
                <td>{{item.balance}}</td>
                <td>{{item.unconfirmed}}</td>
                <td>{{item.deposited}}</td>
                <td>{{item.depositeding}}</td>
                <td>{{item.deposit}}</td>
                <td>{{item.security}}</td>
                <td>{{item.out_profit}}</td>
                <td>{{item.other_amt}}</td>
                <td>{{item.freeze}}</td>
                <td>
                    <a class="btn btn-primary btn-xs" ui-sref="app.finance.bill_detail({id:item.bill_id})"><i class="fa fa-cog"></i>明细</a>
                    <a class="btn btn-primary btn-xs" ng-if="query.is_oem=='true'" ui-sref="app.finance.bill_recharge({id:item.bill_id})"><i class="fa fa-cog"></i>充值</a>
                </td>
            </tr>
        </tbody>
    </table>
	<div class="row">
		<div class="col-md-12">
			<uib-pagination total-items="model.total_result" items-per-page="model.size" ng-model="model.page" num-pages="model.total_pages"
							ng-change="search_page(model.page)" class="pagination-sm" boundary-links="true" boundary-link-numbers="true" max-size="20"
							previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
			<span class="pull-right" style="margin: 30px 0px 20px 0px">共{{model.total_result}} 当前：{{model.page}}/{{model.total_pages}}</span>
		</div>
	</div>
</div>